<?php	include_once("../helper/DBOperation.php");
		$dbObj = new DBOperation();
	include("../helper/check_user_login.php");
        checkUserIsLogin("admin");

if(isset($_REQUEST['id']) && $_REQUEST['id']!=""){
	
	$id = mysql_real_escape_string($_REQUEST['id']);
	$query = "delete from tbl_users where id = '".$id."'";
	if(mysql_query($query)){
		$_SESSION['success'] = "User have been deleted successfully.";
	}else{
		$_SESSION['error'] = "User can not be deleted this time. Please try again later.";
	}	
}else{
	$_SESSION['error'] = "You may have clicked an old link.";	
}
header("location:user_listing.php"); 	
?>




